//
//  ViewController.m
//  UIActivityIndicatorView
//
//  Created by clz on 2019/8/6.
//  Copyright © 2019年 clz. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@property(nonatomic,strong)UIActivityIndicatorView *activityIndicatorView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.activityIndicatorView = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
    self.activityIndicatorView.color = [UIColor whiteColor];
    self.activityIndicatorView.backgroundColor = [UIColor blackColor];
    [self.view addSubview:self.activityIndicatorView];
    self.activityIndicatorView.frame = CGRectMake(100, 100, 100, 100);
    self.activityIndicatorView.hidesWhenStopped = NO;
    
}

- (IBAction)start:(id)sender {
    [self.activityIndicatorView startAnimating];
}

- (IBAction)stop:(id)sender {
    [self.activityIndicatorView stopAnimating];
}


@end
